package com.xzq.bugstack;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;

/**
 * @Author xzq
 * @Description //TODO
 * @Date 2021/11/18 20:50
 * @Version 1.0.0
 **/
public class MyChannelInitializer extends ChannelInitializer<SocketChannel> {


    @Override
    protected void initChannel(SocketChannel ch) throws Exception {
        System.out.println("连接建立....");
        System.out.println("连接IP：" + ch.localAddress().getHostString());
        System.out.println("连接Port:" + ch.localAddress().getPort());
        System.out.println("报告完毕！");
    }
}
